<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>小飞象-会员中心-基本资料</title>
    <link rel="stylesheet" href="//at.alicdn.com/t/font_810097_mgs6xzz1oj.css">
    <link rel="stylesheet" href="../css/common/reset.css">
    <link rel="stylesheet" href="../layui/css/layui.css">
    <link rel="stylesheet" href="../../css/reset-layui.css">
    <link rel="stylesheet" href="../css/header.css">
    <link rel="stylesheet" href="../css/common/nav.css">
    <link rel="stylesheet" href="../css/common/aside.css">
    <link rel="stylesheet" href="../css/common/content.css">
    <link rel="stylesheet" href="../css/capital.css">
</head>

<body>
    <header>
        <div class="wrapper">
            <div class="clearfix headerBox">
                <h1 class="fl logo">
                    <a href="">小飞象</a>
                </h1>
                <!-- <div class="fl alipayName">支付宝充值账号: <b class="redColor">156****8656</b>开户人: <b class="redColor">陈小窝</b></div> -->
                <div class="fr logOut">退出</div>
                <div class="fr userName"></div>
            </div>
        </div>
    </header>
    <div class="mhNav">
        <ul class="navMenuBox">
            <li>
                <a href="../index.html" class="active">
                    飞象首页
                </a>
            </li>
            <li>
                <a href="javascript:;">
                    会员中心
                </a>
                <ul class="mhColumnSide">
                    <li>
                        <a href="../member/basicInfo.html">基本资料</a>
                    </li>
                    <li>
                        <a href="../member/storeMage.html">店铺管理</a>
                    </li>
                    <li>
                        <a href="../member/readjustNum.html">调整单量</a>
                    </li>
                    <li>
                        <a href="/goodsMage.html">商品管理</a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="javascript:;">
                    计划管理
                </a>
                <ul class="mhColumnSide">
                    <li>
                        <a href="../plan/newPlan.html">新建计划</a>
                    </li>
                    <li>
                        <a href="../plan/planMage.html">计划管理</a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="javascript:;">
                    订单管理
                </a>
                <ul class="mhColumnSide">
                    <li>
                        <a href="../order/orderMage.html">订单管理</a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="javascript:;">
                    资金管理
                </a>
                <ul class="mhColumnSide">
                    <li>
                        <a href="inAccout.html">账号充值</a>
                    </li>
                    <li>
                        <a href="transferMage.html">转账管理</a>
                    </li>
                    <li>
                        <a href="orderMage/dailyTaskDes.html">订单信息</a>
                    </li>
                    <li>
                        <a href="expressForm.html">获取快递底单</a>
                    </li>
                </ul>
            </li>
            <li>
                <a href="">在线客服</a>
            </li>
        </ul>
    </div>
    <div class="clearfix wrapper mainBomContent">
        <div class="asideMenu">
            <h2 class="title">
                <i class="iconfont icon--"></i> 资金管理
            </h2>
            <ul>
                <li>
                    <a href="inAccout.html">账号充值</a>
                </li>
                <li>
                    <a href="transferMage.html">转账管理</a>
                </li>
                <li>
                    <a href="orderMage/dailyTaskDes.html">订单信息</a>
                </li>
                <li class="active">
                    <a href="expressForm.html">获取快递底单</a>
                </li>
            </ul>
        </div>
        <div class="rightContent">
            <div class="expressFormView">
                <div class="orderTopDesBox">
                    <div class="fl orderBack">
                        <h2> 订单反馈（单次最多同时提交10笔订单）</h2>
                        <div class="clearfix writeExpress">
                            <div class="fl">
                                <ul class="inputBox">
                                    <li>
                                        <i class="iconfont"></i>
                                        <input type="text" placeholder="请输入订单号" onkeyup="this.value=this.value.replace(/[^\r\n0-9]/g,'');">
                                    </li>
                                    <li>
                                        <i class="iconfont"></i>
                                        <input type="text" placeholder="请输入订单号" onkeyup="this.value=this.value.replace(/[^\r\n0-9]/g,'');">
                                    </li>
                                    <li>
                                        <i class="iconfont"></i>
                                        <input type="text" placeholder="请输入订单号" onkeyup="this.value=this.value.replace(/[^\r\n0-9]/g,'');">
                                    </li>
                                    <li>
                                        <i class="iconfont"></i>
                                        <input type="text" placeholder="请输入订单号" onkeyup="this.value=this.value.replace(/[^\r\n0-9]/g,'');">
                                    </li>
                                    <li>
                                        <i class="iconfont"></i>
                                        <input type="text" placeholder="请输入订单号" onkeyup="this.value=this.value.replace(/[^\r\n0-9]/g,'');">
                                    </li>
                                    <li>
                                        <i class="iconfont"></i>
                                        <input type="text" placeholder="请输入订单号" onkeyup="this.value=this.value.replace(/[^\r\n0-9]/g,'');">
                                    </li>
                                    <li>
                                        <i class="iconfont"></i>
                                        <input type="text" placeholder="请输入订单号" onkeyup="this.value=this.value.replace(/[^\r\n0-9]/g,'');">
                                    </li>
                                    <li>
                                        <i class="iconfont"></i>
                                        <input type="text" placeholder="请输入订单号" onkeyup="this.value=this.value.replace(/[^\r\n0-9]/g,'');">
                                    </li>
                                    <li>
                                        <i class="iconfont"></i>
                                        <input type="text" placeholder="请输入订单号" onkeyup="this.value=this.value.replace(/[^\r\n0-9]/g,'');">
                                    </li>
                                    <li>
                                        <i class="iconfont"></i>
                                        <input type="text" placeholder="请输入订单号" onkeyup="this.value=this.value.replace(/[^\r\n0-9]/g,'');">
                                    </li>
                                </ul>
                            </div>
                            <div class="fr desInfoBox">
                                <div class="fl labelText">备注：</div>
                                <div class="fl">
                                    <textarea name="" id="bak"></textarea>
                                </div>
                                <div class="clear" style="clear:both;"></div>
                                <div class="clearfix uploadBox">
                                    <div class="fl labelText">
                                        上传截图：
                                    </div>
                                    <div class="fl uploadImgs">
                                        <a href="" class="fl exampleBox">
                                            <img src="../images/upload-1.jpg" alt="">
                                            <div class="exampleText">
                                                示例</div>
                                        </a>
                                        <div class="fl showImg">
                                            <img src="../images/tianjia.png" alt="" class="addImg">
                                            <img src="../images/upload-1.jpg" alt="">
                                        </div>
                                    </div>
                                </div>
                                <input type="submit" value="提交" class="btn sureBtn" lay-submit="" lay-filter="expressBtn">
                            </div>
                        </div>
                    </div>
                    <div class="fr getListDes">
                        <h2> 获取快递底单说明</h2>
                        <div class="wrapBox">
                            <span class="warning">此功能只提供获取底单服务，若无需拿底单，请勿在此页面反馈。</span>
                            <p>1、当订单出现降权、虚假交易等状况，需要 <b class="redColor">获取快递底单</b> 时，请向平台反馈；</p>
                            <p>
                                2、收到反馈后我们会尽快为商家提供快递底单；
                            </p>
                            <p>
                                3、如果 <b class="redColor">急需底单</b>，请在提交后联系官方客服加急处理，QQ：800186664。
                            </p>
                        </div>
                    </div>
                </div>
                <div class="clear" style="clear:both;"></div>
                <div class="noOrderBack">
                    <!-- <h3 class="blueColor">异常订单反馈表</h3>
                    <div class="clearfix topHeadFilter">
                        <p class="fl">
                            订单编号：<input class="select_215" id="PlatformOrderNumber" name="PlatformOrderNumber" style="width:150px;"
                                type="text" value="">
                        </p>
                        <p class="fl">
                            反馈状态：<select class="select_215" id="FeedbackStatus" name="FeedbackStatus" style="width:130px;">
                                <option value="">请选择</option>
                                <option value="0">待处理</option>
                                <option value="1">处理完成</option>
                            </select>
                        </p>
                        <p class="fl">
                            统计时间：<input class="laydate-icon" id="BeginDate" maxlength="16" name="BeginDate" style="width:110px;height:34px;margin-left:5px;"
                                type="text" value=""> ~
                            <input class="laydate-icon" id="EndDate" maxlength="16" name="EndDate" style="width:110px;height:34px;"
                                type="text" value="">
                        </p>
                        <p id="loading2" class="fl">
                            <input class="btn sureBtn" type="button" id="btnSearch" value="查询">
                            <input class="btn editBtn" id="export" value="刷新" type="button">
                        </p>
                    </div> -->
                    <!-- <table class="layui-table">
                        <colgroup>
                            <col width="110">
                            <col width="90">
                            <col>
                            <col>
                            <col>
                            <col>
                            <col width="160">
                        </colgroup>
                        <thead>
                            <tr>
                                <th>订单编号</th>
                                <th>运单号</th>
                                <th>单号类型</th>
                                <th>买号</th>
                                <th>店铺名称</th>
                                <th>反馈状态</th>
                                <th>申请时间</th>
                            </tr>
                        </thead>
                        <tbody class="errorOrder">
                            <tr>
                                <td>176137363188945196</td>
                                <td>815701090449</td>
                                <td>圆通快递</td>
                                <td>林0407</td>
                                <td>灯先生旗舰店</td>
                                <td>处理完成</td>
                                <td>2018/8/31 13:38:38</td>
                            </tr>
                        </tbody>
                    </table> -->
                </div>
            </div>
        </div>
    </div>
    <script src="../js/jquery.min.js"></script>
    <script src="../js/jquery.cookie.js"></script>
    <script src="../layui/layui.js"></script>
    <script>
        $(".mhNav .navMenuBox > li > a").click(function (event) {
            if ($(this).siblings('ul').is(':visible')) {
                $(this).siblings('ul').stop(true, true).slideUp();
                $(this).removeClass('active')
            } else {
                $(this).siblings('ul').stop(true, true).slideDown().parents('li').siblings().find('ul').stop(true, true).slideUp();
                $(this).addClass('active').parents('li').siblings().find('a').removeClass('active');
            }
        });
    </script>
    <script>
        var mid = $.cookie('id');
        if (!mid) {
            window.location.href = "/login.html";
        }
        var numArr = [];   // 定义一个空数组
        layui.use(['laydate', 'form'], function () {
            var laydate = layui.laydate,
                form = layui.form;
            $.ajax({
                url: 'http://47.92.174.143:8888/v1/client/shop/merchants/' + mid,
                type: 'GET',
                dataType: 'json',
                contentType: "application/json;charset=utf-8",
                success: function (data) {
                    console.log("请求到的数据", data)
                    var _Success = data.code;
                    var html = "";
                    if (_Success == 200) {
                        if (!data.data.length) {
                            layer.msg('请先绑定店铺', {
                                icon: 1,//提示的样式
                                time: 3000, //2秒关闭（如果不配置，默认是3秒）//设置后不需要自己写定时关闭了，单位是毫秒
                                end: function () {
                                    location.href = '/member/storeMage.html';
                                }
                            });
                        }
                        var shopId = data.data[0].id;
                        $.cookie("shopId", shopId);
                        console.log("shopId", shopId);
                    } else {
                        layer.msg(data.data);
                    }
                }
            });
            laydate.render({
                elem: '#BeginDate'
                , type: 'datetime'
                , istime: true
                , format: 'yyyy-MM-dd HH:mm'
            });
            laydate.render({
                elem: '#EndDate'
                , type: 'datetime'
                , istime: true
                , format: 'yyyy-MM-dd HH:mm'
            });
            form.on('submit(expressBtn)', function (data) {
                Total();
                var shopId = $.cookie("shopId");
                console.log("提交后的shopId", shopId)
                var bak = $("#bak").val();
                var JdateJson = {
                    "merchantsId": mid,
                    "shopId": shopId,
                    "orderNos": numArr,
                    "bak": bak
                };
                $.ajax({
                    // url: "http://47.92.174.143:8888/v1/client/plan",
                    // url: 'http://192.168.5.210:8888/vi/client/goods',
                    url: 'http://rap2api.taobao.org/app/mock/85924/v1/client/goods',
                    type: 'POST',
                    dataType: 'json',
                    contentType: "application/json;charset=utf-8",
                    data: JSON.stringify(JdateJson),
                    success: function (data) {
                        // return;
                        var _Success = data.code;
                        if (_Success == 200) {
                            // layer.msg("提交成功");
                        } else {
                            layer.msg(data.data);
                        }
                    }
                });
                return false;
            });
            $.ajax({
                // url: "http://47.92.174.143:8888/v1/client/plan",
                // url: 'http://192.168.5.210:8888/vi/client/goods',
                url: 'http://rap2api.taobao.org/app/mock/85924/v1/client/goods',
                type: 'GET',
                dataType: 'json',
                contentType: "application/json;charset=utf-8",
                // data: JSON.stringify(JdateJson),
                success: function (data) {
                    // return;
                    var _Success = data.code;
                    if (_Success == 200) {
                        var str = "";
                        for (var i = 0; i < data.data.length; i++) {
                            var type = data.data[i].type == 1 ? "圆通快递" : "";
                            var status = data.data[i].status == 1 ? "完成" : "正在处理";
                            str += '<tr>';
                            str += '<td>' + data.data[i].orderNo + '</td>';
                            str += '<td>' + data.data.courierId + '</td>';
                            str += '<td>' + type + '</td>';
                            str += '<td>' + data.data[i].wantNo + '</td>';
                            str += '<td>' + data.data[i].shopName + '</td>';
                            str += '<td>' + status + '</td>';
                            str += '<td>' + data.data.createTime + '</td>';
                            str += '</tr>';
                        }
                        $(".errorOrder").append(str);
                        // layer.msg("提交成功");
                    } else {
                        // layer.msg(data.data);
                    }
                }
            });
        });
        $(".inputBox input[type=text]").live("click keydown", function () {
            if ($('.inputBox li:first input').val() == "") {
                $(".inputBox li:first input").focus();
            }
        })
        $(".inputBox input[type=text]").live("blur", function () {
            if ($('.inputBox li input').val() == "") {
                $(".inputBox li:first input").css('border', '1px solid #4882f0');
            }
        });
        function Total() {
            var txt = $('.inputBox').find(':text'); // 获取所有文本框
            for (var i = 0; i < txt.length; i++) {
                if (txt.eq(i).val().length == 17 || txt.eq(i).val().length == 11 || txt.eq(i).val().length == 18) {
                    numArr.push({ orderNo: txt.eq(i).val() }); // 将文本框的值添加到数组中
                } else {
                    $(".sureBtn").val("订单填写错误");
                    $(".sureBtn").css("background", "#ff0000");
                    $(".sureBtn").attr('disabled', true);
                }
            }
            console.info(numArr);
        }
        $.ajax({
            type: "get",
            url: "http://47.92.174.143:8888/v1/client/merchants/" + mid,
            dataType: 'json',
            success: function (data) {
                // console.log("请求数据为", data.data)
                // 存储总额
                if (data.data == null || !data.data) {
                    layer.msg('数据出错,请重新登录', {
                        icon: 5,
                        time: 6000,
                        end: function () {
                            location.href = '/login.html';
                        }
                    });
                } else {
                    $(".userName").html(data.data.loginId);
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) { }
        });
    </script>
</body>

</html>